$(document).ready(function() {
	
	$('#frmLogin').validate({
		errorClass		: 'error',
		errorElement	: 'span',
		onfocusout		: false,
		onkeyup			: false,
		ignore			: "input[type='text']:hidden",
		rules: {
			username: {
				required: true
			},
			password_h: {
				required: true
			}
		},
		messages: {
			username: {
				required: true
			},
			password_h: {
				required: true
			}
		},
		submitHandler: function(form) {
			var strPasswordHint = $('#password_h').val();
			var strChap			= MD5(MD5(strPasswordHint));		
			$('#password').val(strChap);
			$('#password_h').val('');
			form.submit();
		}
	});
});